App.ready.push( function () {
	$('body').ajaxError(function(e, xhr, settings, exception) {
		var html = '<h2 style="color: maroon">AJAX response error</h2>' + exception;
		$('body').append(
			'<div style="top: 10%; left: 10%; position:absolute; background: #eee; opacity: 0.9; padding: 10px; border: 1px solid #ccc;">' +
			html +
			'<br /><a href="javascript:;" onclick="$(this).parent().hide();">close</a>' +
			'</div>'
		);
	});
});

function print_r( o )
{
	var s = '';

	if ( typeof o == 'object' )
	{
		for ( var i in o ) s += i + ': ' + o[i] + "\n";
	}
	else
	{
		s = o;
	}

	alert(s);
}